const { promisify } = require("util")
const downloadGitRepo = require("download-git-repo") // 下载远程仓库文件
const ora = require("ora") // 进度条显示

// repo 下载地址
module.exports.clone = async function(repo, desc) { 
  const download = promisify(downloadGitRepo)
  const process = ora(`下载......${repo}`)
  process.start()
  await download(repo, desc)
  process.succeed()
}